home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
BBS-Archive
/
Comm
/
AmiTCP30b2.lha
/
src
/
appl
/
qwriter
/
qwriter.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-14
|
1KB
|
54 lines
#define BUFFERLEN 30*1024
#define NFSTIMEOUT 1.0
#define PPPINITFCS 0xffff /* Initial FCS value */
#define PPPGOODFCS 0xf0b8 /* Good final FCS value */
#define OK 0
#define FAIL -1
#define UWORD unsigned short
#define preturn(X) { perror(X); return FAIL; }
#ifndef __SASC
#define min(a,b) ((a) < (b) ? (a) : (b))
#define max(a,b) ((a) > (b) ? (a) : (b))
#else
#define USE_BUILTIN_MATH
#endif
/*
* u16 represents an unsigned 16-bit number. Adjust the typedef for
* your hardware.
*/
typedef unsigned short u16;
typedef unsigned long u32;
int ftp_client(char *host, UWORD port1, int length, int bufsiz, int chk);
int ftp_server(UWORD port1, int bufsiz, int chk);
int nfs_client(char *host, UWORD port1, int rounds, int length,
int bufsiz, double tval, int chk);
int nfs_server(char *host, UWORD port1, int bufsiz,
int length, int chk);
int telnet_client(char *host, UWORD port1, int rounds, int bufsiz, int chk);
int telnet_server(UWORD port1, int *dtable, int chk);
u16 pppfcs(u16 fcs, unsigned char *cp, int len);
int open_client(char *hostname,UWORD port,int type);
int open_server(char *hostname,UWORD port,int type);
extern char *MyHost;
#ifndef AMIGA
#define CloseSocket(x) close(x)
#else
#define ioctl IoctlSocket
#endif
#ifdef DEBUG
#define DP(X) printf X
#else
#define DP(X)
#endif